package net.mingsoft.base.dao;

import com.baomidou.mybatisplus.core.mapper.*;
import org.apache.ibatis.annotations.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import net.mingsoft.base.entity.*;

public interface IBaseDao<E> extends BaseMapper<E>
{
    void alterTable(@Param("table") final String table, @Param("fileds") final Map fileds, @Param("type") final String type);
    
    int countBySQL(@Param("table") final String table, @Param("wheres") final Map wheres, @Param("sqlWhereList") final List<Map> sqlWhereList);
    
    void createTable(@Param("table") final String table, @Param("fileds") final Map<Object, List> fileds);
    
    void deleteBySQL(@Param("table") final String table, @Param("wheres") final Map wheres);
    
    void dropTable(@Param("table") final String table);
    
    @InterceptorIgnore(tenantLine = "true")
    List excuteSql(@Param("sql") final String sql);
    
    void insertBySQL(@Param("table") final String table, @Param("fields") final Map fields);
    
    List queryBySQL(@Param("table") final String table, @Param("fields") final List<String> fields, @Param("wheres") final Map wheres, @Param("sqlWhereList") final List<Map> sqlWhereList, @Param("begin") final Integer begin, @Param("end") final Integer end, @Param("orderBy") final String orderBy, @Param("order") final String order);
    
    void updateBySQL(@Param("table") final String table, @Param("fields") final Map fields, @Param("wheres") final Map wheres);
    
    void delete(@Param("ids") final int[] ids);
    
    void delete(@Param("ids") final String[] ids);
    
    void updateCache();
    
    @Deprecated
    void deleteEntity(final int id);
    
    @Deprecated
    void deleteByEntity(final BaseEntity entity);
    
    @Deprecated
    BaseEntity getEntity(final Integer id);
    
    @Deprecated
     <E> E getByEntity(final BaseEntity entity);
    
    List<E> query(final BaseEntity entity);
    
    @Deprecated
    List<E> queryAll();
    
    @Deprecated
    List<E> queryByPage(@Param("pageNo") final int pageNo, @Param("pageSize") final int pageSize, @Param("orderBy") final String orderBy, @Param("order") final boolean order);
    
    @Deprecated
    int queryCount();
    
    @Deprecated
    void saveBatch(@Param("list") final List list);
    
    @Deprecated
    int saveEntity(final BaseEntity entity);
    
    @Deprecated
    void updateEntity(final BaseEntity entity);
}
